using System; 
using System.Collections.Generic; 
using System.Text; 
using FluentNHibernate.Mapping;

namespace Zeus.Biz.DomainModel.NHib.Northwind {
    
    
    public class OrderDetailMap : ClassMap<OrderDetail> {
        
        public OrderDetailMap() {
			Table("Order Details");
			LazyLoad();
			CompositeId().KeyProperty(x => x.OrderID, "OrderID").KeyProperty(x => x.ProductID, "ProductID");
			References(x => x.Order).Column("OrderID");
			References(x => x.Product).Column("ProductID");
			Map(x => x.UnitPrice).Column("UnitPrice").Not.Nullable();
			Map(x => x.Quantity).Column("Quantity").Not.Nullable();
			Map(x => x.Discount).Column("Discount").Not.Nullable();
        }
    }
}
